1 timer still in the queue

Descripcion

Al lanzar los tests obtenemos el siguiente error:

1 timer(s) still in the queue
Solución

Para solucionar este problema tenemos que añadir el metodo flush() al final de nuestro test:

necesitamos el siguiente import para utilizar dicho metodo:

import { flush } from '@angular/core/testing';
Tags

java | Angular | variable | inicializacion